<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
      
        <div class="layui-form-item">
            <label class="layui-form-label">树屋编号</label>
            <div class="layui-input-block">
                <input type="text" name="title" class="layui-input" lay-verify="required" placeholder="请输入树屋编号" value="">
            </div>
        </div>
        <div class="layui-form-item">
                    <label class="layui-form-label ">树屋图</label>
                    <div class="layui-input-block layuimini-upload">
                        <input name="image" class="layui-input layui-col-xs6"  placeholder="请上传树屋图" value="">
                        <div class="layuimini-upload-btn">
                            <span><a class="layui-btn layui-btn-sm" data-upload="image" data-upload-number="one" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                          <!--   <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_cover_picture" data-upload-select="thumb" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span> -->
                        </div>
                    </div>
            </div>
   <div class="layui-form-item">
                    <label class="layui-form-label ">树屋详情图</label>
                    <div class="layui-input-block layuimini-upload">
                        <input name="detail_image" class="layui-input layui-col-xs6"  placeholder="请上传树屋详情图" value="">
                        <div class="layuimini-upload-btn">
                            <span><a class="layui-btn layui-btn-sm" data-upload="detail_image" data-upload-number="more" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                          <!--   <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_cover_picture" data-upload-select="thumb" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span> -->
                        </div>
                    </div>
            </div>
        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>
<script type="text/javascript">
 layui.use(['form', 'layer', 'jquery' ], function () {
        $ = layui.jquery;
        var layer = layui.layer,
            form = layui.form;
      
        //监听优惠券类型
        form.on('radio(ticket_type)', function (data) {
        　　if(data.value==3){
             $(".coupon_type").removeClass('layui-hide');
             $(".new_user").addClass('layui-hide');   
            }else if(data.value==2){
                $(".new_user").removeClass('layui-hide'); 
                $(".coupon_type").addClass('layui-hide');
            }else{
                $(".coupon_type").addClass('layui-hide');
                $(".new_user").addClass('layui-hide'); 
            }
           
        });
    });  
</script>